1. Field of the Invention
The present invention relates to a semiconductor disk apparatus and, more particularly, to a magnetic disk apparatus (DASD: Direct Access Storage Device) which enables high-speed access from a host apparatus without any mechanical operation by writing all the user data that are to be stored in the magnetic disc apparatus, in a semiconductor memory.
2. Description of the Related Art
A semiconductor disk apparatus is a disk apparatus which uses a semiconductor memory as a recording medium in place of a magnetic disk apparatus while maintaining the behavior (command code, data transfer method, etc.) of the magnetic disk apparatus. Therefore, the interface between the host apparatus (CPU) and the semiconductor disk control device is completely the same as the interface between the CPU and the magnetic disk control device. The semiconductor disk apparatus is advantageous in that it can be accessed instantaneously because it is not necessary to move the head unlike in the magnetic disk apparatus, and in that it is possible to utilize the software resources between the CPU and the magnetic disk control device as they are.
FIG. 57 shows the structure of such a semiconductor disk apparatus. The reference numeral la represents a CPU, 2 a semiconductor disk apparatus as a shared storage device (SSD), 3 a semiconductor disk control device, and 4 a semiconductor disk which is provided with a plurality of semiconductor memory modules (MS: Main Storage) 4a, 4b, 4c, . . . and an extended storage adapter (ESA) 4s as a memory interface adapter for controlling the writing of data into and reading of data from the semiconductor memory modules. The reference numeral 5 denotes a maintenance panel or a personal computer.
In the semiconductor disk control unit 3, the reference numeral 3a represents a channel adapter CA having a single or a plurality of interfaces (host interfaces) between the channel adapter and the host apparatus CPU 1a. Although only one channel adapter 3a is shown in FIG. 57, a plurality of adapters are actually provided. The reference numeral 3b represents a resource manager RM provided with an exclusive control table (not shown) for executing exclusive control so as to allow another host interface to use a predetermines semiconductor memory module when no host interface is using the semiconductor memory module, while inhibiting any other host interface from using the semiconductor memory module when it is used by one host interface. Actually, the semiconductor memory module is divided into a plurality of logical drives, and the resource manager RM executes exclusive control for each drive. The reference numeral 3c denotes a service adapter SA for conducting initial microprogram loading processing (IML), state monitoring processing, and recovery processing at the time of a trouble for each unit, and 3d, 3e and 3f control storage portions for storing various control tables and programs.
First problem
In the semiconductor disk apparatus, a trouble in a semiconductor memory module is fatal. If a trouble generates in a semiconductor memory module in a conventional semiconductor disk apparatus, after data are evacuated, the power switch is turned off and the semiconductor memory module having the trouble is replaced by another semiconductor memory module. After replacing the semiconductor memory module, the power switch is turned on so as to activate the semiconductor disk apparatus and the data are restored. In this method, however, a device specially for evacuating data is necessary. In addition, since it is impossible to use the semiconductor disk apparatus while the power is off and when data are in the process of evacuation/restoration, the semiconductor disk apparatus cannot meet the demand for a non-stop apparatus. Although a method of replacing a semiconductor memory module having a trouble without stopping the semiconductor disk apparatus is proposed (Method of Maintaining Semiconductor Disk without Stopping the Semiconductor Disk Apparatus, Japanese Patent Laid-Open No. 268020/1991), it is disadvantageous in that a large-scale maintenance device for enabling maintenance of a semiconductor disk without stopping the semiconductor disk apparatus is required separately from the semiconductor disk apparatus.
Second problem
When the power of a semiconductor disk apparatus is turned off, the contents of the memories are lost. To prevent this, some semiconductor disk apparatuses have backup disk devices connected thereto. Each of the semiconductor memory modules which constitute a semiconductor disk apparatus is divided into a plurality of logical drives, and the host apparatus designates a logical drive by issuing a Start I/O command. If the designated logical drive is usable, the host apparatus accesses a predetermined position of the logical drive. The structure of the logical drive of such a semiconductor disk and the logical drive of a backup disk device have a one-to-one correspondence. However, if the size or the position of the logical drive of the semiconductor disk is changed, the structure of the logical drive of the semiconductor disk and the logical drive of the backup disk device does not correspond to one to one. For this reason, even if data are evacuated into the backup disk device before the structure of the semiconductor disk is changed, it is impossible to restore the data which is evacuated into the backup disk after the change in the structure of the logical drive of the semiconductor disk, so that the data before the change become invalid and cannot be used.
Third problem
Since a semiconductor disk apparatus emulates a magnetic disk apparatus, it has not only a user data portion provided in the actual device but also a control information portion called directory provided in each track. The semiconductor disk apparatus manages the address relative to the memory of the currently emulated record (user data) in the track field and each sector information, etc. by the directory.
When a channel adapter accesses the user data area of the designated track field, the channel adapter obtains the control information of the designated track field by taking the directory of the designated track into the channel adapter and accesses the user data in accordance with the control information. The directory is composed of (1) the record number of the last record that is written in the traffic field, (2) the sector directory and (3) the record directory. The sector directory is a table in which the ordinal number of the record which is read out first in set sector processing is written, and the record directory is a table in which the relative address (offset address) from the head of track to each record is written. The record directory is used in order to access a record field directly by the record number. By using such information, it is possible to directly move an orient (virtual head position) at the time of set sector processing and search ID processing, which enables high-speed access.
When the target directory portion cannot be read due to a 2-bit error of a memory or the like, all the user data of the track field which is controlled by the corresponding directory become inaccessible, so that the valid user data are actually lost. To prevent this, a data loss preventing mechanism is required which makes the user data accessible even when the directory cannot be read.
In a conventional semiconductor disk apparatus, when the track field designated by the firmware of a channel adapter is to be accessed, the directory in which the control information on the track field is written is generally first read before processing is started. Consequently, if it is impossible to read the directory, access to the track field is impossible because there is no recovery means for the collapsed directory. It is therefore necessary to initialize the collapsed directory by initializing the smallest unit (e.g, 1 cylinder) and make the directory valid in order to make the track, which cannot be read, reusable. Initialization, however, erases the user data in the initialized region, so that it is necessary to evacuate, in advance, the data in the region being initialized. The data in the track field which becomes inaccessible due to the collapse of the directory can only be read in accordance with a memory damp command which is prepared as one of the channel commands. For this reason, it is impossible to extract and reproduce the necessary part as the user data of the track field except by the user who knows the track format within the semiconductor disk apparatus. In other words, it is almost impossible to completely restore the original data.
Fourth problem
In a semiconductor disk apparatus, the data storage medium is a semiconductor memory chip. Therefore, the memory cost per bit in a semiconductor disk apparatus is higher than that in a magnetic disk apparatus. In addition, the storage capacity per semiconductor disk apparatus is smaller than that of a magnetic disk apparatus. In order to solve the problem of the storage capacity, a method of compressing data before writing and restoring the original data before reading is proposed. Such a data compression method, however, suffers from the problem that the size of compressed data is sometimes different from the original data size when the user data is reloaded. When the data size after the compression is smaller than the original data size, it is necessary to release the surplus region for the effective use of the memory. On the other hand, when the data size after the compression is larger, it is necessary to secure a new region before reloading. Such memory control is complicated, and it is conventionally impossible to control the release/allocation of the memory region for the purpose of effective utilization by a simple method.